import { stringify } from 'qs';
import request from '../utils/request';

export async function query(params) {
  return request(`/creditvehicledealer/dealeroppage?${stringify(params)}`, {
    method: 'get',
  });
}

export async function queryDealer(params) {
  return request(`/dealer/list?${stringify(params)}`, {
    method: 'get',
  });
}

export async function findByCode(params) {
  return request(`/dealer/findonebycode?${stringify(params)}`, {
    method: 'get',
  });
}

export async function orgSelect() {
  return request('/dealer/select', {
    method: 'GET',
  });
}

export async function dealersAdd(params) {
  return request('/dealer/addBatch', {
    method: 'POST',
    body: params,
  });
}

export async function resetPassword(params) {
  return request('/dealer/resetpassword', {
    method: 'POST',
    body: params,
  });
}
